package com.example.SocialApplication.activity.dialog;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.view.Window;
import android.widget.Button;
import com.example.SocialApplication.HelperFactory;
import com.example.SocialApplication.R;

public class VkDialogLogout extends Dialog {
    private VkDialogLogoutListener listener;

    public VkDialogLogout(Context context, final VkDialogLogoutListener listener) {
        super(context);
        this.listener = listener;
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.vk_logout_dialog);

        Button yes = (Button) findViewById(R.id.yes);
        yes.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                listener.onCancel();
            }
        });

        Button no = (Button) findViewById(R.id.no);
        no.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                listener.onContinue();
            }
        });
    }

    public interface VkDialogLogoutListener {
        void onContinue();

        void onCancel();
    }
}
